import http from '@/utils/http';

export const login = async (data: any) => {
  const resp = await http.post('/user/login', data);
  return resp;
};

export const getList = async () => {
  const resp = await http.get('/user/list');
  return resp;
};

export const create = async (data) => {
  const resp = await http.post('/user/create', data);
  return resp;
};

export const update = async (data) => {
  const resp = await http.post('/user/update', data);
  return resp;
};

export const deleteById = async (id) => {
  const resp = await http.post('/user/delete', { id });
  return resp;
};

export default {
  login,
};
